package com.hellowx.qydcdev.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 订单表(OrderPay)表实体类
 *
 * @author hellowx
 * @since 2022-01-10 14:10:53
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class OrderPay extends Model<OrderPay> {

    /**
     * 主键,标识订单
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 顾客id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long customerId;

    /**
     * 总金额
     */
    private Integer totalPrice;

    /**
     * 状态:
     * 0-未支付
     * 1-已支付
     * 2-取消
     * 3-退订
     */
    private Integer status;

    /**
     * 支付编号
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long payNo;

    /**
     * 地址id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long addressId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 店铺id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long businessId;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

